// eslint-disable-next-line
import { UserLayout, BasicLayout, RouteView, BlankLayout, PageView } from '@/layouts'
import { bxAnaalyse } from '@/core/icons'
import i18n from '../utils/lang/index.js'
export const asyncRouterMap = [

  {
    path: '/',
    name: 'index',
    component: BasicLayout,
    meta: { title: '首页' },
    redirect: '/',
    children: [
      // dashboard
      {
        path: '/member',
        name: 'member',
        redirect: '/member/list',
        component: BlankLayout,
        meta: { title: i18n.t("router.sjlb"), keepAlive: true, icon: bxAnaalyse, permission: [ 'dashboard' ] },
        children: [
          {
            path: '/member/list',
            name: 'member',
            component: () => import('@/views/member/List'),
            meta: { title: i18n.t("router.sjlb"), keepAlive: false, permission: [ 'ta2ble' ] }
          }
        ]
      }
    ]
  },
  {
    path: '*', redirect: '/404', hidden: true
  }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
  {
    path: '/login',
    component: UserLayout,
    redirect: '/login',
    hidden: true,
    children: [
      {
        path: '/',
        name: 'login',
        component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
      }
    ]
  },

  {
    path: '/test',
    component: BlankLayout,
    redirect: '/test/home',
    children: [
      {
        path: 'home',
        name: 'TestHome',
        component: () => import('@/views/Home')
      }
    ]
  },

  {
    path: '/404',
    component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
  },
  {
    path: '/',
    component: BasicLayout,
    redirect: '/',
    children: [
      {
        path: '/',
        name: 'home',
        component: () => import('@/views/index')
      }
    ]
  }

]
